You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time we call to healpy or healpix we are using NumPy data and therefore lose out on autodifferentiability etc. This PR tries to reduce the usage, and is split into a few parts.
ang2vec was no longer being used anyway, this should have been removed in the deprecated functions.
almxfl has been replaced with glass.harmonics.multalm, this should have been done before.
get_nside has been replaced by glass.harmonics.npix2nside.
pixwin and pol have been removed from glass.harmonics.inverse_transform/glass.healpix._alm2map. These weren't having any affect when they were used in the code, and doesn't make sense in an S2FFT context.
pol has been removed from glass.harmonics.transform/glass.healpix._map2alm for similar reasons. use_pixel_weights has been set to True always as it was the only time it was used within GLASS.
@connoraird and I discussed this on a call whether the arguments are safe to remove:
pixwin in _alm2map_ was always False as was the default
use_pixel_weights in _map2alm was always True, so set as default
pol in both _alm2map_alm and _map2alm wasn't doing anything as the input was always alm. As explained in the healpy docs.
Added: Some new feature
Changed: glass.harmonics.transform now always has use_pixel_weights=True
Changed: glass.healpix.alm2map has now been made private glass.healpix._alm2map
Changed: glass.healpix.map2alm has now been made private glass.healpix._map2alm
Removed: pixwin and pol from glass.healpix._alm2map
Removed: pol from glass.healpix._map2alm
Removed: the glass.healpix.almxfl, glass.healpix.ang2vec and glass.healpix.get_nside wrappers.
Checks
Is your code passing linting?
Is your code passing tests?
Have you added additional tests (if required)?
Have you modified/extended the documentation (if required)?
Have you added a one-liner changelog entry above (if required)?
Enable pixel weights to exercise offline fixture data
tests/core/test_healpix.py:122
This test no longer exercises the pulled pixel-weight data: map2alm still defaults use_pixel_weights to False, so Healpy does not read weights from the fixture's HEALPY_DATAPATH. Keep use_pixel_weights=True here while removing only the obsolete pol argument so the offline-data path remains covered.
This issue also appears on line 138 of the same file.
The reason will be displayed to describe this comment to others. Learn more.
Thanks — I’ve kept glass.healpix.map2alm unchanged. The use_pixel_weights=True change is only in glass.harmonics.transform, where it’s part of the S2FFT-backed path rather than the HEALPix compatibility API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiAn (incompatible) API changearray-apiWork is related to the Array APIenhancementNew feature or requestmaintenanceMaintenance: refactoring, typos, etc.needs-2-reviewersCould be considered "controversial" so worth a second pair of eyesspherical-transformChanged related to spherical transforms, i.e. HEALPix
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Every time we call to
healpyorhealpixwe are using NumPy data and therefore lose out on autodifferentiability etc. This PR tries to reduce the usage, and is split into a few parts.ang2vecwas no longer being used anyway, this should have been removed in the deprecated functions.almxflhas been replaced withglass.harmonics.multalm, this should have been done before.get_nsidehas been replaced byglass.harmonics.npix2nside.pixwinandpolhave been removed fromglass.harmonics.inverse_transform/glass.healpix._alm2map. These weren't having any affect when they were used in the code, and doesn't make sense in an S2FFT context.polhas been removed fromglass.harmonics.transform/glass.healpix._map2almfor similar reasons.use_pixel_weightshas been set toTruealways as it was the only time it was used within GLASS.@connoraird and I discussed this on a call whether the arguments are safe to remove:
pixwinin_alm2map_was alwaysFalseas was the defaultuse_pixel_weightsin_map2almwas always True, so set as defaultpolin both_alm2map_almand_map2almwasn't doing anything as the input was alwaysalm. As explained in the healpy docs.Closes: #1243
Changelog entry
Added: Some new feature
Changed:
glass.harmonics.transformnow always hasuse_pixel_weights=TrueChanged:
glass.healpix.alm2maphas now been made privateglass.healpix._alm2mapChanged:
glass.healpix.map2almhas now been made privateglass.healpix._map2almRemoved:
pixwinandpolfromglass.healpix._alm2mapRemoved:
polfromglass.healpix._map2almRemoved: the
glass.healpix.almxfl,glass.healpix.ang2vecandglass.healpix.get_nsidewrappers.Checks